﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using TileEngine.items;
using TileEngine.items.tiles.material;
namespace TileEngine.tiles.material
{
    class DirtWall : DefaultWall
    {
        public DirtWall(int x,int y)
        {
            this.x = x;
            this.y = y;
        }
        override public bool breakTile()
        {
            Global.currentWorld.tiles[x, y].tile = new Empty(x,y);
            Global.currentWorld.items.Add(new DirtItem(new Vector2(x*Global.tileSize.X, y*Global.tileSize.Y)));
            return true;
        }
        override public Type getItemType()
        {
            return typeof(DirtItem);
        }
        override public Color getLight()
        {
            return Color.Black;
        }
        override public int getWidht()
        {
            return 0;
        }
        override public int getHeight()
        {
            return 0;
        }
        override public int getHardness()
        {
            return 10;
        }
        override public double getLightAbsorption()
        {
            return 0.9;
        }
        public override void setCoord(int x, int y)
        {
            this.x = x;
            this.y = y;
        }
        public override Texture2D getTexture()
        {
            return Textures.dirtWall;
        }
    }
}
